package cn.domob.android.ads;

import org.json.JSONObject;
import org.json.JSONTokener;

class l
{
  protected static final String A = "click_tracker";
  protected static final String B = "imp_tracker";
  protected static final String C = "event_tracker";
  protected static final String D = "tracker";
  protected static final String E = "animation";
  protected static final String F = "o";
  protected static final String G = "cls_btn";
  protected static final String H = "imp_min";
  protected static final String I = "imp_cls";
  protected static final String J = "expire";
  protected static final String K = "rc";
  protected static final String L = "pkg";
  protected static final String M = "code";
  protected static final String N = "text";
  protected static final String O = "refresh";
  protected static final String P = "disable";
  protected static final String Q = "dis_time";
  protected static final String R = "ors";
  protected static final String S = "version";
  protected static final String T = "config";
  private static J U = new J(l.class.getSimpleName());
  protected static final String a = "sid";
  protected static final String b = "cid";
  protected static final String c = "ad";
  protected static final String d = "error";
  protected static final String e = "control";
  protected static final String f = "id";
  protected static final String g = "format";
  protected static final String h = "width";
  protected static final String i = "height";
  protected static final String j = "ct";
  protected static final String k = "url";
  protected static final String l = "content";
  protected static final String m = "base_url";
  protected static final String n = "expandable";
  protected static final String o = "render";
  protected static final String p = "ct";
  protected static final String q = "url";
  protected static final String r = "content";
  protected static final String s = "base_url";
  protected static final String t = "o";
  protected static final String u = "preload";
  protected static final String v = "timeout";
  protected static final String w = "autoplay";
  protected static final String x = "cls_btn";
  protected static final String y = "width";
  protected static final String z = "height";
  private String V;
  private String W;
  private String X;
  private b Y;
  private c Z;
  private a aa;

  protected static l a(String paramString)
  {
    l locall = new l();
    if (locall.b(paramString))
    {
      U.a("Ad/Error response is ok.");
      return locall;
    }
    return null;
  }

  private boolean b(String paramString)
  {
    while (true)
    {
      try
      {
        this.V = paramString;
        JSONObject localJSONObject1 = new JSONObject(new JSONTokener(paramString));
        this.W = localJSONObject1.optString("sid", null);
        this.X = localJSONObject1.optString("cid", null);
        JSONObject localJSONObject2 = localJSONObject1.optJSONObject("ad");
        JSONObject localJSONObject3 = localJSONObject1.optJSONObject("error");
        JSONObject localJSONObject4 = localJSONObject1.optJSONObject("control");
        if (localJSONObject2 != null)
        {
          this.Y = new b(localJSONObject2);
          if (localJSONObject4 == null)
            break label151;
          this.aa = new a(localJSONObject4);
          break label151:
        }
        if (localJSONObject3 == null)
          break label140;
        this.Z = new c(localJSONObject3);
      }
      catch (Exception localException)
      {
        U.a(localException);
        return false;
      }
      label140: U.e("There is no ad response or error response.");
    }
    label151: return true;
  }

  protected String a()
  {
    return this.V;
  }

  protected String b()
  {
    return this.W;
  }

  protected String c()
  {
    return this.X;
  }

  protected b d()
  {
    return this.Y;
  }

  protected c e()
  {
    return this.Z;
  }

  protected a f()
  {
    return this.aa;
  }

  class a
  {
    private boolean b = false;
    private int c;
    private boolean d;
    private int e;
    private String f;
    private String g;

    a(JSONObject arg2)
    {
      Object localObject;
      if (localObject == null)
        return;
      if (localObject.has("refresh"))
      {
        this.c = localObject.optInt("refresh");
        this.b = true;
      }
      this.d = localObject.optBoolean("disable", false);
      this.e = localObject.optInt("dis_time", 0);
      JSONObject localJSONObject = localObject.optJSONObject("ors");
      if (localJSONObject == null)
        return;
      this.f = localJSONObject.optString("version", "1");
      this.g = localJSONObject.optString("config", "{\"com.admogo.AdMogoLayout\":\"1\",\"com.guohead.sdk.GHView\":\"2\",\"com.adview.AdViewLayout\":\"3\",\"appfactory.cn.adplatform.AdSageLayout\":\"4\"}");
    }

    protected int a()
    {
      return this.c;
    }

    protected boolean b()
    {
      return this.d;
    }

    protected int c()
    {
      return this.e;
    }

    protected boolean d()
    {
      return this.b;
    }

    protected String e()
    {
      return this.f;
    }

    protected String f()
    {
      return this.g;
    }
  }

  class b
  {
    private String b;
    private String c;
    private String d;
    private String e;
    private String f;
    private String g;
    private int h;
    private int i;
    private a j;
    private String k;
    private String l;
    private String m;
    private String n;
    private int o;
    private String p;
    private boolean q;
    private int r;
    private int s;
    private long t;
    private boolean u;
    private String v;
    private int w = -1;

    b(JSONObject arg2)
    {
      Object localObject;
      if (localObject == null)
        return;
      this.b = localObject.optString("id", null);
      this.c = localObject.optString("format", "domob");
      this.d = localObject.optString("ct", null);
      this.e = localObject.optString("url", null);
      this.f = localObject.optString("base_url", null);
      this.g = localObject.optString("content", null);
      this.h = localObject.optInt("width", 0);
      this.i = localObject.optInt("height", 0);
      JSONObject localJSONObject = localObject.optJSONObject("expandable");
      if (localJSONObject != null)
        this.j = new a(localJSONObject);
      this.k = localObject.optString("click_tracker", null);
      this.l = localObject.optString("imp_tracker", null);
      this.m = localObject.optString("event_tracker", null);
      this.n = localObject.optString("tracker", null);
      this.o = localObject.optInt("animation", 1);
      this.p = localObject.optString("o", "v");
      this.q = localObject.optBoolean("cls_btn", true);
      this.r = localObject.optInt("imp_min", 0);
      this.s = localObject.optInt("imp_cls", 0);
      this.t = localObject.optLong("expire", 172800L + System.currentTimeMillis() / 1000L);
      this.u = localObject.optBoolean("rc", false);
      this.v = localObject.optString("pkg", null);
    }

    protected String a()
    {
      return this.b;
    }

    protected void a(int paramInt)
    {
      this.w = paramInt;
    }

    protected String b()
    {
      return this.c;
    }

    protected int c()
    {
      return this.h;
    }

    protected int d()
    {
      return this.i;
    }

    protected String e()
    {
      return this.e;
    }

    protected String f()
    {
      return this.d;
    }

    protected String g()
    {
      return this.f;
    }

    protected String h()
    {
      return this.g;
    }

    protected a i()
    {
      return this.j;
    }

    protected String j()
    {
      return this.k;
    }

    protected String k()
    {
      return this.l;
    }

    protected String l()
    {
      return this.m;
    }

    protected String m()
    {
      return this.n;
    }

    protected int n()
    {
      return this.o;
    }

    protected String o()
    {
      return this.p;
    }

    protected boolean p()
    {
      return this.q;
    }

    protected int q()
    {
      return this.r;
    }

    protected int r()
    {
      return this.s;
    }

    protected long s()
    {
      return this.t;
    }

    protected boolean t()
    {
      return this.u;
    }

    protected String u()
    {
      return this.v;
    }

    protected int v()
    {
      return this.w;
    }

    class a
    {
      private String b;
      private String c;
      private String d;
      private String e;
      private String f;
      private String g;
      private boolean h;
      private int i;
      private boolean j;
      private boolean k;
      private int l;
      private int m;

      a(JSONObject arg2)
      {
        Object localObject;
        if (localObject == null)
          return;
        this.b = localObject.optString("render", "fs");
        this.c = localObject.optString("ct", null);
        this.d = localObject.optString("url", null);
        this.f = localObject.optString("content", null);
        this.e = localObject.optString("base_url", null);
        this.g = localObject.optString("o", "h");
        this.h = localObject.optBoolean("preload", true);
        this.i = localObject.optInt("timeout", 5);
        this.j = localObject.optBoolean("autoplay", false);
        this.k = localObject.optBoolean("cls_btn", true);
        this.l = localObject.optInt("width", -1);
        this.m = localObject.optInt("height", -1);
      }

      protected String a()
      {
        return this.b;
      }

      protected String b()
      {
        return this.c;
      }

      protected String c()
      {
        return this.d;
      }

      protected String d()
      {
        return this.e;
      }

      protected String e()
      {
        return this.f;
      }

      protected String f()
      {
        return this.g;
      }

      protected boolean g()
      {
        return this.h;
      }

      protected int h()
      {
        return this.i;
      }

      protected boolean i()
      {
        return this.j;
      }

      protected boolean j()
      {
        return this.k;
      }

      protected int k()
      {
        return this.l;
      }

      protected int l()
      {
        return this.m;
      }
    }
  }

  class c
  {
    private int b;
    private String c;

    c(JSONObject arg2)
    {
      Object localObject;
      if (localObject == null)
        return;
      this.b = localObject.optInt("code", 0);
      this.c = localObject.optString("text", null);
    }

    protected int a()
    {
      return this.b;
    }

    protected String b()
    {
      return this.c;
    }
  }
}

/* Location:           C:\Users\god\Desktop\liunianjishiben_V1.1_mumayi_3745b_dex2jar.jar
 * Qualified Name:     cn.domob.android.ads.l
 * JD-Core Version:    0.5.4
 */